package com.group6.controller;


import com.group6.entity.Doctor;
import com.group6.service.DoctorService;
import com.group6.vo.DoctorVo;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
//doctor
@RestController
@RequestMapping("/Doctor")
public class DoctorController {

    @Resource
    private DoctorService doctorService;

    @RequestMapping("/DoctorList")
    public List<Doctor> DoctorList(){

        return  doctorService.DoctorList();
    }
    @RequestMapping("/DoctorAdd")
    public String DoctorAdd(@RequestBody DoctorVo doctorVo){


        return  doctorService.DoctorAdd(doctorVo);
    }
    @RequestMapping("/DoctorUpdate")
    public String DoctorUpdate(@RequestBody Doctor doctor){

        return  doctorService.DoctorUpdate(doctor);
    }
    @RequestMapping("/DepartmentDelete")
    public String doctorDelete(@RequestBody Doctor doctor){

        return  doctorService.doctorDelete(doctor);
    }
}
